
/*直接更新 state 多个对象*/

import {
    RECIEVE_CATEGORYS,
    RECIEVE_ADDRESS,
    RECIEVE_SHOPS, RECIEVE_USERINFO,RESET_USERINFO,RECEIVE_GOODS,RECEIVE_INFO,RECEIVE_RATINGS
} from "./mutations-types"

export default {
    ytyt(state,yyt){
        state.address = yyt
    },
    [RECIEVE_ADDRESS](state,address){
    state.address = address
},
    [RECIEVE_CATEGORYS](state,categorys){
        state.categorys = categorys
    },
    [RECIEVE_SHOPS](state,shops){
        state.shops = shops
    },
    [RECIEVE_USERINFO](state,userInfo){
        state.userInfo = userInfo
    },
    [RESET_USERINFO](state){
        state.userInfo = {}
    },

    //mock 数据
    [RECEIVE_INFO](state, info) {
        state.info = info
    },

    [RECEIVE_RATINGS](state, {ratings}) {
        state.ratings = ratings
    },

    [RECEIVE_GOODS](state, {goods}) {
        state.goods = goods
    },

}